﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using System.Data;

namespace Admin.Finance
{
    public partial class MainInvoiceChargeShow : System.Web.UI.Page
    {
        public string strid = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (Request.Params["id"] != null && Request.Params["id"].Trim() != "")
                {
                    strid = Request.Params["id"];
                    int MainInvoiceChargeId = (Convert.ToInt32(strid));
                    ShowInfo(MainInvoiceChargeId);
                }
            }
        }

        private void ShowInfo(int MainInvoiceChargeId)
        {
            ChinaSoft.BLL.Common.Bind bllBind = new ChinaSoft.BLL.Common.Bind();
            DataSet ds = bllBind.GetDataSet("*", "V_FinaceMainInvoiceChargeShow", "MainInvoiceChargeId="+MainInvoiceChargeId);
            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                DataRow dr = ds.Tables[0].Rows[0];
                lblProjectInfoNumber.Text = dr["ProjectNumber"].ToString();
                lblProjectInfoName.Text = dr["ProjectName"].ToString();
                lblContractName.Text = dr["ContractName"].ToString();
                lblConstractNumber.Text = dr["ContractNumber"].ToString();
                lblMainInvoiceNumber.Text = dr["ContractName"].ToString();
                lblReceiveMoney.Text = dr["ReceiveMoney"].ToString();
                lblReceiveDate.Text = dr["ReceiveDate"].ToString();
                lblReceiveMan.Text = dr["ReceiveMan"].ToString();
            }
        }
    }
}